fstats_doe_designs Module

Experimental design generation and efficiency assessment.



Functions

public pure function doe_design_efficiency(x) result(metrics)

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:,:) :: x

Return Value type(doe_efficiency_metrics)


Subroutines

public subroutine central_composite_design(nfactors, alpha_type, tbl)

Generates a central composite design in coded variables.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: nfactors

Number of factors.

character(len=*), intent(in), optional :: alpha_type

Type: "orthogonal" (default), "rotatable", "uniform".

real(kind=real64), intent(out) :: tbl(:,:)

Design table (coded variables in [-1, +1] range).

public pure subroutine central_composite_design_size(nfactors, alpha_type, m, n)

Computes the size of a central composite design.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: nfactors

Number of factors.

character(len=*), intent(in), optional :: alpha_type

Type of CCD: "orthogonal" (default), "rotatable", or "uniform".

integer(kind=int32), intent(out) :: m

Number of runs (rows).

integer(kind=int32), intent(out) :: n

Number of factors (columns).

public subroutine fractional_factorial(nfactors, fraction, tbl)

Generates a 2-level fractional factorial design.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: nfactors

Number of factors.

integer(kind=int32), intent(in) :: fraction

Fraction level (1 for 1/2, 2 for 1/4, etc.).

real(kind=real64), intent(out) :: tbl(:,:)

Design table (runs x factors) in coded variables, where each value is either -1 or +1.

public subroutine fractional_factorial_size(nfactors, fraction, m, n)

Computes the size of a fractional factorial design.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: nfactors

Number of factors (k).

integer(kind=int32), intent(in) :: fraction

Fraction level (p): 1 for 1/2, 2 for 1/4, 3 for 1/8, etc.

integer(kind=int32), intent(out) :: m

Number of runs (rows).

integer(kind=int32), intent(out) :: n

Number of factors (columns), same as nfactors.

public subroutine full_factorial(vars, tbl)

Computes a table with values scaled from 1 to N describing a full-factorial design.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: vars(:)

An M-element array containing the M factors to study.
Each of the M entries to the array is expected to contain the number of options for that particular factor to explore. This value must be greater than or equal to 1.

integer(kind=int32), intent(out) :: tbl(:,:)

A table where the design will be written. Use get_full_factorial_matrix_size to determine the appropriate table size.

public subroutine full_factorial_coded(vars, tbl)

Computes a full-factorial design in coded variables on the range [-1, +1]. Each factor with L levels is assigned L evenly spaced values from -1 to +1 (inclusive). A factor with a single level is assigned a value of 0. For a 2-level factor, the levels are -1 and +1.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: vars(:)

An M-element array containing the M factors to study. Each of the M entries to the array is expected to contain the number of levels for that particular factor to explore. This value must be greater than or equal to 1.

real(kind=real64), intent(out) :: tbl(:,:)

A table where the design will be written. Use get_full_factorial_matrix_size to determine the appropriate table size.

public subroutine get_full_factorial_matrix_size(vars, m, n)

Computes the appropriate size for a full-factorial design table.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: vars(:)

An M-element array containing the M factors to study. Each of the M entries to the array is expected to contain the number of options for that particular factor to explore.
This value must be greater than or equal to 1.

integer(kind=int32), intent(out) :: m

The number of rows for the table.

integer(kind=int32), intent(out) :: n

The number of columns for the table.

public subroutine latin_hypercube_design(nfactors, nsamples, seed, tbl)

Generates a Latin hypercube design for factor space exploration.

Read more…

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: nfactors

Number of factors.

integer(kind=int32), intent(in) :: nsamples

Number of samples (runs).

integer(kind=int32), intent(inout), optional :: seed

Random seed for reproducibility.

real(kind=real64), intent(out) :: tbl(:,:)

Latin hypercube design (nsamples × nfactors).